<extend name="./Application/Admin/View/Index/index.html"/>

<block name="box">
    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">添加拼团商品</h6>
            </div>
        </div>
        <div class="layui-container" style="margin-top: 20px">
            <div class="layui-row">

                <div class="layui-col-md5 layui-col-md-offset1">
                    <form class="layui-form" action="{{:U('Group/adddo')}}" method="post" enctype="multipart/form-data">
                        <div class="layui-form-item">
                            <label class="layui-form-label">商品名</label>
                            <div class="layui-input-inline">
                                <select name="id" lay-verify="required">
                                    <option value=""></option>
                                    <foreach name="goods" item="vo" key="k">
                                        <option value="{{$vo['id']}}">{{$vo['name']}}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">团购价</label>
                            <div class="layui-input-inline">
                                <input type="text" name="gprice" required  lay-verify="required"  autocomplete="off" class="layui-input">
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">限购数量</label>
                            <div class="layui-input-inline">
                                <input type="text" name="limit_num" required  lay-verify="required"  autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">团购人数</label>
                            <div class="layui-input-inline">
                                <input type="text" name="user_num" required  lay-verify="required"  autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">是否显示</label>
                            <div class="layui-input-block">
                                <input type="radio" name="is_show" value="1" title="是"checked>
                                <input type="radio" name="is_show" value="0" title="否" >
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">开始时间</label>
                            <div class="layui-input-inline">
                                <input type="text" name="begin_time" class="layui-input" id="test">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">结束时间</label>
                            <div class="layui-input-inline">
                                <input type="text" name="end_time" class="layui-input" id="test1">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit >立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                    <script>
                        layui.use('laydate', function(){
                            var laydate = layui.laydate;
                            //执行一个laydate实例
                            laydate.render({
                                elem: '#test' //指定元素
                                ,type: 'datetime'
                            });
                            laydate.render({
                                elem: '#test1' //指定元素
                                ,type: 'datetime'
                            });

                        });
                    </script>
                </div>
            </div>
        </div>
        <script>
            //Demo
            layui.use('form', function(){
                var form = layui.form;

                //监听提交
                form.on('submit(formDemo)', function(data){
                    layer.msg(JSON.stringify(data.field));
                    return false;
                });
            });
        </script>

        <div class="show-page padding-big-right hidden">
            <div class="page">
            </div>
        </div>
    </div>

</block>
